<header>
    <div class="navbar navbar-default navbar-static-top">
        <div class="container">
            <div class="navbar-header">
                <button class="navbar-toggle" type="button" (click)="isCollapsed = !isCollapsed">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
                <div class="navbar-brand">
                    <a href="/" target="_self">
                        <span style="font-weight:bold;color:#428bca;">ripple<font style="font-weight:bold;color:#FF9933;">OK</font></span>
                    </a>
                </div>
            </div>
            <div collapse="isCollapsed" class="navbar-collapse collapse" id="navbar-main">
                <ul class="nav navbar-nav">
                    <!-- <li *ngFor="let item in menu" [class]="{active: isActive(item.link)}">
                        <a [href]="{{item.link}}">{{item.title}}</a>
                    </li> -->
                    <li [hidden]="!isAdmin()" [ngClass]="{active: isActive('/admin')}">
                        <a href="/admin">Admin</a>
                    </li>
                </ul>
                <ul class="nav navbar-nav">
                    <li [ngClass]="{active: isActive('ledger')}">
                        <a routerLink="/ledger/32570" target="_blank">{{gv.lang==0?'Ledger':'总账'}}</a>
                    </li>
                    <li [ngClass]="{active: isActive('transaction')}">
                        <a routerLink="/transaction/0" target="_blank">{{gv.lang==0?'Transaction':'交易'}}</a>
                    </li>
                    <li [ngClass]="{active: isActive('account')}">
                        <a routerLink="/account/0" target="_blank">{{gv.lang==0?'Account':'账号'}}</a>
                    </li>
                    <li [ngClass]="{active: isActive('gateway')}">
                        <a routerLink="/gateway/CNY.razqQKzJRdB4UxFPWf5NEpEG3WMkmwgcXA" target="_blank">{{gv.lang==0?'Gateway':'网关'}}</a>
                    </li>
                </ul>

                <ul class="nav navbar-nav navbar-right" [hidden]="true">
                    <li [hidden]="isLoggedIn()" [ngClass]="{active: isActive('/signup')}">
                        <a href="/signup">Sign up</a>
                    </li>
                    <li [hidden]="isLoggedIn()" [ngClass]="{active: isActive('/login')}">
                        <a href="/login">Login</a>
                    </li>
                    <li [hidden]="isLoggedIn()">
                        <p class="navbar-text">Hello {{ getCurrentUser().name }}</p>
                    </li>
                    <li [hidden]="!isLoggedIn()" [ngClass]="{active: isActive('/settings')}">
                        <a href="/settings">
                            <span class="glyphicon glyphicon-cog"></span>
                        </a>
                    </li>
                    <li [hidden]="isLoggedIn()" [ngClass]="{active: isActive('/logout')}">
                        <a href="" ng-click="logout()">Logout</a>
                    </li>
                </ul>
                <form class="navbar-form navbar-right" style="width:600px" METHOD="get">
                    <div class="input-group" style="width:100%">
                        <input type="text" class="form-control" [(ngModel)]="xid" name="xid" (keypress)="($event.keyCode === 13)?clickQuery():0" placeholder="r...address ~name LedgerIndex TXhash">
                        <span class="input-group-btn" style="width:150px">
                              <button class="btn btn-primary" type="button" (click)="clickQuery();">Let's go. ripple
                              <span style="font-weight:bold;color:#FF9933;">OK</span> »</button>
                        </span>
                    </div>
                </form>
            </div>
        </div>
    </div>
</header>
